<%@taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<%@taglib uri="/WEB-INF/struts-nested.tld" prefix="nested"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-template.tld" prefix="template"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ page contentType="text/html; charset=iso-8859-1"%>

<html:html>
<head>
<title><bean:message key="Application.Name"/> ~ <bean:message key="Clients.PageTitle"/></title>
<link href="<bean:write name="path"/>/css/estilos.css" rel="stylesheet" type="text/css"/>
<script language="javascript1.1">
function fnc_copiarDatos( codigo, descripcion){
	try{
		var clienteArticuloUnidad = window.opener.document.forms[0];
		
		clienteArticuloUnidad.str_codigoClie.value = codigo;
		clienteArticuloUnidad.str_descripcionClie.value = descripcion;
		clienteArticuloUnidad.target = '';
		// clienteArticuloUnidad.submit();

		window.opener.focus();
		window.close();
	}catch(e){
		alert(e);
		throw e;
	}
}

</script>
</head>
<body>
<br>
<html:form action="clientecAction.do" focus="str_search">
	<html:hidden property="action" value="listadoClienteClienteArticuloUnidad"/>
	<input name="hdn_buscar" type="hidden" value="true">
	<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" class="tabla">
	  <tr class="encabezadoTabla">
		<td colspan="4"><table width="100%" border="0" cellspacing="0" cellpadding="0">
					  <tr>
						<td width="30">&nbsp;<img src="<bean:write name="path"/>/images/img_loginFlecha.gif"></td>
						<td>&nbsp;&nbsp;<strong class="font_general"><bean:message key="Clients.PageTitle"/></strong></td>
					  </tr>
			</table></td>
	  </tr>
	  <tr>
		<td height="0" colspan="3"></td>
	  </tr>
	  <tr class="encabezado_col font_general">
		<td colspan="4" align="center"><bean:message key="CreatePriceRequest.MainTable.Client"/>:&nbsp;&nbsp;<html:text property="str_search" styleClass="textfield" maxlength="60" size="30"/>
		&nbsp;&nbsp;&nbsp;
	    <html:submit property="btn_guardar" styleClass="boton"><bean:message key="Application.Search"/></html:submit></td>
	  </tr>
	  <tr>
		<td height="0" colspan="4"></td>
	  </tr>
	  <tr>
		<td width="6%" align="center" class="encabezado_col font_general">&nbsp;</td>
		<td width="12%" align="center" class="encabezado_col font_general"><bean:message key="GroupClient.MainTable.Code"/></td>
		<td width="76%" align="center" class="encabezado_col font_general"><bean:message key="GroupClient.MainTable.Descr"/></td>
	  </tr>
	  <logic:iterate id="cliente_bean" name="Cliente" indexId="int_i">
		  <tr class="<%=int_i.intValue()%2==0?"":"im"%>par font_general">
			<td align="center">
				<html:link href="#">
					<img src="<bean:write name="path"/>/images/img_add.gif" height="16" width="16"  alt="Agregar Cliente" border="0" onClick="fnc_copiarDatos('<bean:write name='cliente_bean' filter='false' property='str_codgoCli'/>','<bean:write name='cliente_bean' filter='false' property='str_descripcionCli'/>');">
				</html:link>					
			</td>
			<td align="center"><bean:write name="cliente_bean" filter="false" property="str_codgoCli"/></td>
			<td>&nbsp;<bean:write name="cliente_bean" filter="false" property="str_descripcionCli"/></td>
		  </tr>
	  </logic:iterate>
  </table>
</html:form>
<br>
</body>
</html:html>
